import request from '@/utils/request.js'
// 1、加入购物车
export const insertCartService = ({ skuId, count }) => {
  return request.post('/member/cart', { skuId, count })
}

// 2、获取最新的购物车列表
export const getNewCartList = () => {
  return request.get('/member/cart')
}

// 3、删除购物车数据
export const delCartService = (ids) => {
  return request.delete('/member/cart', {
    data: {
      ids
    }
  })
}

// 4、合并购物车
export const mergeCartData = (data) => {
  return request.post('/member/cart/merge', data)
}
